const user = {
  namespaced: true,
  state: {
    id: 0,
    name: '',
    roleName: '',
    lastLoginTime: ''
  },
  mutations: {
    updateId (state, id) {
      state.id = id;
    },
    updateName (state, name) {
      state.name = name;
    },
    updateRoleNames (state, names) {
      state.roleNames = names;
    },
    updateLastLoginTime (state, loginTime) {
      state.lastLoginTime = loginTime;
    }
  }
};

export default user;
